const { deepFreeze } = require('~/utils')
const TYPE = {
  STRING: 'String',
  DATE: 'Date',
  NUMBER: 'Number',
  BOOLEAN: 'Boolean',
  OBJECT: 'Object',
  ARRAY: 'Array',
  S: 10,
  B: 100,
  Q: 1000,
  W: 10000,
  SW: 100000,
  BW: 1000000,
  QW: 10000000,
  Y: 100000000,
  isType(data) {
    const getType = Object.prototype.toString
    const typeStr = getType.call(data)
    const type = typeStr.split(' ')[1].replace(/]$/g, '')
    console.log({ type })
    return type
    /*
    return date === this.STRING ||
      date === this.DATE ||
      date === this.NUMBER ||
      date === this.BOOLEAN
      */
  },
}

deepFreeze(TYPE)
export default TYPE
